﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Practices.Unity;

namespace ERPStore.Start
{
	public class ServiceBusConfig
	{
		public static void Configure(IUnityContainer container)
		{
			container.RegisterType<Services.IServiceBus, Services.ArianeServiceBus>(new ContainerControlledLifetimeManager());
			container.RegisterType<Ariane.IServiceBus, Ariane.BusManager>(new ContainerControlledLifetimeManager());

			Ariane.GlobalConfiguration.Configuration.DependencyResolver = new IOC.ServiceBusDependencyResolver(container);
			Ariane.GlobalConfiguration.Configuration.Logger = new Logging.ServiceBusLogger();
		}
	}
}
